﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;
using Thaire.Investment.Domains.Transaction;

namespace Thaire.Investment.Repository
{
    public class DepositInstructionDetailRepo : BaseRepository<DepositInstructionDetail, int>
    {
        public DepositInstructionDetailRepo(ISession session)
            : base(session)
        {
        }

        public List<DepositInstructionDetail> GetListByHeaderId(int headerId)
        {
            return _session.QueryOver<DepositInstructionDetail>()
                .Where(x => x.InstructionHeaderID == headerId)
                .OrderBy(x => x.DepositInstructionDetailID).Asc.List().ToList();
        }

    }
}
